package top.hjcwzx.wrench.limiter.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

//令牌桶算法配置
@ConfigurationProperties(prefix = "wrench-kit.limiter.token-bucket", ignoreInvalidFields = true)
public class RateLimiterTokenBucketAutoProperties {

    /**
     * 桶中令牌的个数
     */
    private Integer bucketTokenCapacity = 100;

    /**
     * 每秒补充令牌个数
     */
    private Double refillRatePerSecond = 5.0;


    public Integer getBucketTokenCapacity() {
        return bucketTokenCapacity;
    }

    public void setBucketTokenCapacity(Integer bucketTokenCapacity) {
        this.bucketTokenCapacity = bucketTokenCapacity;
    }

    public Double getRefillRatePerSecond() {
        return refillRatePerSecond;
    }

    public void setRefillRatePerSecond(Double refillRatePerSecond) {
        this.refillRatePerSecond = refillRatePerSecond;
    }
}
